home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.programming / comp.sys.amiga.programmer_33744_000064.msg < prev    next >
Encoding:
Internet Message Format  |  1994-11-27  |  2.2 KB

  1. Path: news.chalmers.se!sunic!EU.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!sxpo.fdn.org!ramses.fdn.org!simon.gris
  2. From: simon.gris@ramses.fdn.org (Simon Gris)
  3. Message-ID: <EEB7F981@ramses.fdn.org>
  4. Newsgroups: comp.sys.amiga.programmer
  5. Distribution: world
  6. X-FTN-To: Terence Tan
  7. Subject: Re: BorderTop/BorderBottom etc..
  8. Date: 09 Jun 94 17:04:46 +0200
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset=iso-8859-1
  11. Content-Transfer-Encoding: 8bit
  12. Organization: RAMSES BBS (France:1-6003-7015/7713/7716)
  13. X-GateSoftware: AmiGate 0.17 (7.6.94)
  14. Lines: 52
  15.  
  16. In a message of 08 Jun 94 Terence Tan wrote to All:
  17.  
  18.  TT> @MSGID: 2:320/104.1 EEAD8EE8
  19.  TT> @REPLYADDR terence@hitech.po.my
  20.  TT> @PID: AmiGate 0.17 (7.6.94)
  21.  
  22.  TT> From: terence@hitech.po.my (Terence Tan)
  23.  
  24.  TT> Quick questions:
  25.  TT> 1. What is the best way to findout the inner width/height of a window
  26.  TT>    (Currently I use [Where pWdw is a struct Window  pointer]
  27.  TT>     pWdw->Width - pWdw->BorderLeft - pWdw->BorderRight or
  28.  TT>     pWdw->Height - pWdw->BorderTop - pWdw->BorderBottom). It doesn't
  29.  TT>     seem to do it properly cause I usually have to adjust it by 1 -2
  30.  TT>     pixels.
  31.  
  32. The best way is :
  33. InnerWidth = pWdw->GZZWidth;
  34. InnerHeight = pWdw->GZZHeight;
  35.  
  36. /* And this work even if the window is not a GZZWindow type */
  37.  
  38.  TT> 2. Does pWdw->BorderTop take into account the drag bar at the top?
  39.  TT>    Is it font sensitive?
  40.  
  41. No ! You have to do the following :
  42.  
  43. OffY = pWdw->BorderTop + pWdw->WScreen->Font->ta_YSize + 1;
  44. OffY = pWdw->BorderRight;
  45.  
  46.  TT> 3. Best way to clear a window?[BltClear??]
  47.  
  48. /* This fill yor entire Window's RastPort. In a normal window this destroy
  49. ** the system imagery on it. Wis a GZZWindow this is great.
  50. */
  51. SetRast( pWdw->RastPort );
  52.  
  53. /* Or if it is not a GZZ : */
  54. EraseRect( pWdw->RastPort, OffX, OffY,
  55.            pWdw->GZZWidth + OffX - 1,
  56.            pWdw->GZZHeight + OffY - 1 );
  57.  
  58. /* or */
  59. SetRast( pWdw->RastPort );   /* Followed by : */
  60. RefreshWindowFrame( pWdw );
  61.  
  62.  
  63. Simon Gris  FIDO 2:320/104.39  EMAIL: Simon.Gris@ramses.telesys-innov.fr
  64.                                       Simon.Gris@ramses.fdn.org
  65.  
  66. ... Contents may have settled during shipping.
  67.  
  68.